package com.yanjiali.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Package: com.yanjiali.entity
 * @Author: yanjiali
 * @Created: 2025/4/14 20:54
 * 文章表
*/
@ApiModel(value="com-yanjiali-entity-Article")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "article")
public class Article {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.INPUT)
    @ApiModelProperty(value="主键")
    private Long id;

    /**
     * 文章标题
     */
    @TableField(value = "title")
    @ApiModelProperty(value="文章标题")
    private String title;

    /**
     * 文章封面
     */
    @TableField(value = "cover")
    @ApiModelProperty(value="文章封面")
    private String cover;

    /**
     * 文章内容
     */
    @TableField(value = "content")
    @ApiModelProperty(value="文章内容")
    private String content;

    /**
     * 文章简介
     */
    @TableField(value = "introduce")
    @ApiModelProperty(value="文章简介")
    private String introduce;

    /**
     * 文章点赞数
     */
    @TableField(value = "like_num")
    @ApiModelProperty(value="文章点赞数")
    private Long likeNum;

    /**
     * 文章收藏数
     */
    @TableField(value = "collect_num")
    @ApiModelProperty(value="文章收藏数")
    private Long collectNum;

    /**
     * 文章创建者
     */
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    @ApiModelProperty(value="文章创建者")
    private Long createBy;

    /**
     * 文章修改者
     */
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    @ApiModelProperty(value="文章修改者")
    private Long updateBy;

    /**
     * 文章创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @ApiModelProperty(value="文章创建时间")
    private Date createTime;

    /**
     * 文章修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty(value="文章修改时间")
    private Date updateTime;
}